﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GD库函数综合使用实例</title>
</head>
<body>
<?php
	header('Content-type: image/jpeg');
	$im = imagecreatefromjpeg("1.jpg");
	$rgb = ImageColorAt($im, 100, 100);   
	echo $rgb."<br>";
	$r = ($rgb >> 16) & 0xFF; //>>按位右移，&:按位与
	echo $r.'<br>'; 
	$g = ($rgb >> 8) & 0xFF;     
	echo $g."<br>";
	$b = $rgb & 0xFF;               
	echo $b."<br>"; 
	ob_clean();  
	flush();
	imagegif($im);
	imagedestroy($im);
?>
</body>
</html>